package com.fly.repository.es;

import com.fly.domain.es.EsBlog;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

/**
 * Created by Fly on 2017/8/2.
 */
public interface EsBlogRepository extends ElasticsearchRepository<EsBlog, String> {

    /**
     * 分页查询博客带去重功能
     * @param title
     * @param content
     * @param summary
     * @param pageable
     * @return
     */
    Page<EsBlog> findDistinctEsBlogByTitleContainingOrContentContainingOrSummaryContaining(String title, String content, String summary, Pageable pageable);
}
